/**
 * 客户端信息，处理客户端信息，保存注册信息
 * @author: wangjian@ruiboyun.net
 */
#ifndef CONNECTIONINFO_HPP
#define CONNECTIONINFO_HPP

#include <string>
#include "JTMessage.hpp"

class Client {
public:
    int          clientSocket;
    std::string  phoneNo;
    std::string  address;
    bool         registered;
    JTMessage    message;
    JT808Header  header;        //接收到的消息头
    ClientInfo   clientInfo;    //客户端注册信息

    Client(int socket);
    Client();
    /*
    * Receive data from the client
    * @return int  The number of bytes received
    */
    int receiveData(int socket);

private:
    //数据包
    unsigned char buffer[1200];
    //数据包，通常用于存放输出包
    unsigned char buffer2[1200];
};

#endif